﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Workflow.Activities;

namespace Bookvar.UpdateProcessWorkflow
{
	[ExternalDataExchange]
	public interface IUpdateProcessCommunicationService
	{
		void CheckIfUpdateCheckIsNecessary();
		void CheckForAvailableNewUpdates();
		void ShouldDownloadUpdates();
		void DownloadUpdates();
		void ShouldInstallUpdates();
		void InstallUpdates();
		
		void ErrorWhileExecutingProcess();
		void FinalizeUpdateCheckingProcess();
		event EventHandler<ExternalDataEventArgs> UpdateCheckIsNecessary;
		event EventHandler<ExternalDataEventArgs> UpdateCheckIsNotNecessary;
		event EventHandler<ExternalDataEventArgs> NewUpdatesAreAvailable;
		event EventHandler<ExternalDataEventArgs> NoNewUpdatesAvailable;
		event EventHandler<ExternalDataEventArgs> ProceedDownloadingUpdates;
		event EventHandler<ExternalDataEventArgs> DoNotDownloadUpdates;

		event EventHandler<ExternalDataEventArgs> ProceedInstallingUpdates;
		event EventHandler<ExternalDataEventArgs> DoNotInstallUpdates;
	}
}
